<?php 
require_once('admin_inc_path.php');

if(!isset ($_SESSION['admflag']) && $_SESSION['admflag']!='true'):
    

if(isset ($_GET['admin_flag'],$_GET['u'],$_GET['code'])&&$_GET['admin_flag']=='true'):
    if(!isset($_SESSION)):
        session_start();
    endif;
    
    $admlist = DAOFactory::getAdminDAO()->queryByUsername($_GET['u']);
    if(!empty($admlist)):
        foreach ($admlist as $key => $adm):
           if($_GET['code']===$adm->password):
               $_SESSION['admflag']='true';
           else:
               die('<h1> 404 - NOT FOUND  </h1> <h3> >> Please verify the URL << </h3> ');
           endif;
        endforeach;
        else:
            header('Location: http://'.BASE_URL);
    endif;

    
    else:
        header('Location: http://'.BASE_URL);
endif;
    
    
endif;






?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title> Admin - Account </title> 
        <link href="../css/style.css" rel="stylesheet" type="text/css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>


        <ul class="admin_left_menu">
            
           
            
            <li><a href="admin_top_menu.php">Top Meny</a></li>
            <li><a href="admin_index.php">Index</a></li>
            <li><a href="admin_info.php">Info</a></li>
            <li><a href="admin_kontakt.php">Kontakt</a></li>
            <li><a href="admin_aktuelt.php">Aktuelt</a></li>
            <li><a href="admin_arkiv.php">Arkiv</a></li>
            <li><a href="admin_strategi.php">Strategi</a></li>
            <li><a href="admin_immate.php">Immate</a></li>
            <li><a href="admin_forelasningar.php">Föreläsningar</a></li>
            <li><a href="admin_bocker.php">Böcker</a></li>
            <li><a href="admin_forum.php">Forum</a></li>
            <li><a href="admin_vada_design.php">Vadå design?</a></li>
            <li><a href="admin_vilkor.php">Vilkor</a></li>
            <li><a href="admin_footer.php">Footer</a></li>
            <br/>
            <br/>
            <br/>
            <hr/>
            
             <li><a href="admin_logout.php">Logout</a></li>
            
        </ul>
        
        